<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
		"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html">
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<title>报名用户管理</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0"><!-- 确保适当的绘制和触屏缩放 -->
	<link rel="stylesheet" href="{$url_css}bootstrap.min.css" type="text/css">
	<link rel="stylesheet" href="{$url_css}admin.css" type="text/css">
	<link rel="stylesheet" href="{$url_css}viewer.min.css" type="text/css"/>

	<script type="text/javascript" src="{$url_js}jquery-2.2.0.min.js"></script>
	<script type="text/javascript" src="{$url_js}jquery-1.12.0.min.js"></script>
	<script type="text/javascript" src="{$url_js}calendar/WdatePicker.js"></script>
	<script type="text/javascript" src="{$url_js}viewer-jquery.min.js"></script>
	<style type="text/css">
		{literal}
		.page_info div {
			display: inline-block;
		}

		.page_info .p_l {
			color: #666;
			float: left;
			line-height: 69px;
			font-size: 16px;
		}

		.page_info .p_r {
			color: #337AB7;
			float: right;
		}

		{/literal}
	</style>
</head>
<body>
<div class="container" style="width: 96%">
	<form action="?do=default" method="get">
		<table class="table table-bordered table-striped" align="center">
			<tr>
				<td colspan="7">
					<h5>报名用户管理</h5>
				</td>
			</tr>
			<tr>
				<td class="form-group col-xs-2">
					<div class="input-group">
						<div class="input-group-addon">UserID</div>
						<input type="text" class="form-control" name="s_userid" placeholder="UserID"
						       value="{if !empty($s_data['s_userid'])}{$s_data['s_userid']}{/if}">
					</div>
				</td>
				<td class="form-group col-xs-2">
					<div class="input-group">
						<div class="input-group-addon">姓名</div>
						<input type="text" class="form-control" name="s_name" placeholder="姓名"
						       value="{if !empty($s_data['s_name'])}{$s_data['s_name']}{/if}">
					</div>
				</td>
				<td class="form-group col-xs-2">
					<div class="input-group">
						<div class="input-group-addon">手机</div>
						<input type="text" class="form-control" name="s_mobile" placeholder="手机" maxlength="11"
						       onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
						       value="{if !empty($s_data['s_mobile'])}{$s_data['s_mobile']}{/if}">
					</div>
				</td>
				<td class="form-group col-xs-2">
					<div class="input-group">
						<div class="input-group-addon">性别</div>
						<select class="form-control" name="s_sex">
							<option value="">全部</option>
							{foreach $sex as $k => $v}
								{if $s_data['s_sex'] === $k}
									<option value="{$k}" selected>{$v}</option>
								{else}
									<option value="{$k}">{$v}</option>
								{/if}
							{/foreach}
						</select>
					</div>
				</td>
				<td class="form-group col-xs-2">
					<div class="input-group">
						<div class="input-group-addon">状态</div>
						<select class="form-control" name="s_status">
							<option value="">全部</option>
							{foreach $status as $k => $v}
								{if $s_data['s_status'] === $k}
									<option value="{$k}" selected>{$v}</option>
								{else}
									<option value="{$k}">{$v}</option>
								{/if}
							{/foreach}
						</select>
					</div>
				</td>
				<td class="form-group col-xs-2">
					<div class="input-group">
						<div class="input-group-addon">排序</div>
						<select class="form-control" name="s_order">
							{foreach $order as $k => $v}
								{if $s_data['s_order'] == $k}
									<option value="{$k}" selected>{$v.name}</option>
								{else}
									<option value="{$k}">{$v.name}</option>
								{/if}
							{/foreach}
						</select>
					</div>
				</td>

				<td class="form-group col-xs-2" colspan="6" align="right">
					<input type="submit" value="搜索" class="btn btn-primary"/>
				</td>
			</tr>
		</table>
	</form>
	<table class="table table-bordered table-striped" align="center">
		<tr>
			<td align="center" style="width: 100px">UserId</td>
			<td align="center" style="width: 100px">姓名</td>
			<td align="center" style="width: 150px">手机</td>
			<td align="center" style="width: 200px">所在城市</td>
			<td align="center" style="width: 150px">详细地址</td>
			<td align="center" style="width: 150px">性别</td>
			<td align="center" style="width: 150px">出身年月</td>
			<td align="center" style="width: 150px">身高</td>
			<td align="center" style="width: 150px">创建时间</td>
			<td align="center" style="width: 150px">报名时间</td>
			<td align="center" style="width: 150px">支付ID</td>
			<td align="center" style="width: 150px">状态</td>
			<td align="center" style="width: 150px">物流编号</td>
			<td align="center" style="width: 200px">操作</td>
		</tr>
		{foreach $list as $k => $v}
			<tr>
				<td align="center">{$v['UserId']}</td>
				<td align="center">{$v['Name']}</td>
				<td align="center">{$v['Mobile']}</td>
				<td align="center">{$v['Area']}</td>
				<td align="center">{$v['Address']}</td>

				<td align="center">{if $v.Sex == 1}男{elseif $v.Sex == 2}女{else}未知{/if}</td>
				<td align="center">{$v['BirthDay']}</td>
				<td align="center">{$v['Height']}</td>
				<td align="center">{$v['CreateTime']}</td>
				<td align="center">{$v['EnrollTime']}</td>
				<td align="center">{if empty($v.PayId)}未支付{else}{$v.PayId}{/if}</td>
				<td align="center">{$status[$v.Status]}</td>
				<td align="center">{$v.logisticsNumber}</td>
				<td align="center"><a class="btn btn-info" href="?do=edit&id={$v.UserId}">修改</a></td>
			</tr>
		{/foreach}
	</table>
	<table class="table table-bordered table-striped" align="center">
		<tr>
			<td colspan="7" align="right">
				<div class="page_info">
					{if $page_info['count']}
						<div class="p_l">一共 {$page_info['count']} 条数据,共 {$page_info['page']} 页</div>
					{/if}
				</div>
				<div class="p_r">{$pagination}</div>
			</td>
		</tr>
	</table>
</div>

<script type="text/javascript">
	{literal}
    $('.img').viewer();


    //hot设置
    $(".hot").each(function () {
        var _this = $(this);
        $(this).hover(function () {
            if (_this.attr('data') == 1) {
                _this.val('隐藏');
            } else {
                _this.val('正常');
            }
        }, function () {
            if (_this.attr('data') == 1) {
                _this.val('正常');
            } else {
                _this.val('隐藏');
            }
        });

        $(this).click(function () {
            $.ajax({
                url: 'templeItem.php?do=Status',
                type: "POST",
                dataType: "json",
                data: {aid: $(this).attr('data_id'),sid:$(this).attr('data')},
                success: function (json) {
                    if (json.type == 'yes') {
                        _this.attr('data', json.rel);
                        if (json.rel == 1) {
                            _this.val('正常');
                        } else {
                            _this.val('隐藏');
                        }
                        top.swal('操作成功！', '成功！', 'success')
                    } else {
                        top.swal('操作失败！', '还有机会！', 'error')
                    }
                }
            });
        });
    });

	{/literal}
</script>

</body>
</html>